package whitefox.gqtcard.adapter;

import java.util.ArrayList;
import java.util.List;

import whitefox.gqtcard.R;
import whitefox.gqtcard.dblocation.Location;

import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.TextView;

public class CheckAdapter extends ArrayAdapter<Location> {

	private Activity context = null;
	// private String[] CAdapter = null;
	private ArrayList<Location> CAdapter = null;
	private int layoutId;

	public CheckAdapter(Activity context, int layoutId,
			ArrayList<Location> CAdapter) {
		super(context, layoutId, CAdapter);
		this.context = context;
		this.CAdapter = CAdapter;
		this.layoutId = layoutId;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		LayoutInflater inflater = context.getLayoutInflater();
		convertView = inflater.inflate(R.layout.catelory, null);
		ImageView icon = (ImageView) convertView.findViewById(R.id.ct_ivIcon);
		TextView text = (TextView) convertView.findViewById(R.id.ct_tvCategory);
		CheckBox check = (CheckBox) convertView.findViewById(R.id.ct_cbCheck);
		text.setText(position);
		return convertView;

	}

}
